home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.6 KB | 79 lines | [TEXT/GEOL] |
- Item 3954360 27-Feb-90 08:52PST
-
- From: CDA0004 VAR Shana Corp, Don Murphy,IVR
-
- To: MACAPP.TECH$ MacApp Technical
- GER.XDV0002 Germany - P1 Ges f Informatik,IVR
-
- Sub: Purging & Dehydrating
-
- Attn: MacApp Technical
- Attn: Elmar Henne
- SentBy: Wayne Malkin
- Date 2/26/90
- Subject Purging & Dehydrating
- From Wayne Malkin
- To Elmar Henne
- MacApp Technical
-
- Memo Subject:Purging & Dehydrating
-
- Elmar,
-
- You have some interesting ideas.
-
- References to an object would all have to be by id. It is too hard to
- automatically change all references to an object when the object gets purged,
- so storing an object's handle as an instance variable of another object is
- unsafe.
-
- This means that any time you invoke a polymorphic method of an object, you
- will be looking up the object by its id in the method dispatcher. Any time you
- invoke a monomorphic method, you will be passing an id to the method as SELF.
-
- The method dispatcher part is ok, since the method dispatcher could easily be
- modified to look up the object. When a monomorphic method has an id as SELF,
- it might get more complicated.
-
-
- 1. Assume the method dispatcher has been modified to do the appropriate lookup
- when it detects an ID instead of a handle. It wouldn't really need to read the
- object, just look up the class id. Reading the object could be handled
- universally by...
-
- 2. writing a routine "LockSELF" that goes at the start of each method in a
- persistent object. This routine would:
-
- 2a. Inspect the SELF at 8(A6) to see if it is handle or id,
- 2b. Create or rehydrate the object if required,
- 2c. Call the Lock method, and
- 2d. Change 8(A6) to the object handle so references to
- instance variables within the method will work and
- subsequent method calls will see a real object. (?hack?)
-
- 3. Write a routine "UnlockSELF" that goes at the end of each method, which
- decrements the counter.
-
-
- Other methods are needed to determine if an object has changed and handle the
- writing to disk.
-
- From the "pseudo object" thread, since we are in here in spades anyway, it
- might be a good idea to include the pseudo object optimization. This might
- also simplify the task of maintaining a decent sized object cache without
- infringing on other memory usage.
-
-
- Questions:
-
- Is SELF always at 8(A6), or does it jump around?
-
- Is it ok to rewrite the method dispatcher like this? Does this mean we forego
- the method dispatcher code that is in the ROM?
-
- Is this just tooooo much of a hack?
-
- -- Wayne Malkin
-
-
-